ruby-adept 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +17 -0
- data/.travis.yml +6 -0
- data/Gemfile +10 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +16 -0
- data/adept.gemspec +33 -0
- data/autotest/discover.rb +2 -0
- data/bin/bprog +110 -0
- data/firmware/.gitignore +73 -0
- data/firmware/epp_stream/Basys2_100_250General.ucf +21 -0
- data/firmware/epp_stream/epp_controller.vhd +210 -0
- data/firmware/epp_stream/epp_stream.xise +355 -0
- data/firmware/epp_stream/fifo.vhd +178 -0
- data/firmware/epp_stream/tests/fifo_testbench.vhdl +164 -0
- data/lib/adept/boards/basys2.rb +84 -0
- data/lib/adept/boards.rb +2 -0
- data/lib/adept/connection_provider.rb +30 -0
- data/lib/adept/data_formats/bitstream.rb +116 -0
- data/lib/adept/data_formats/data_factories.rb +33 -0
- data/lib/adept/data_formats.rb +2 -0
- data/lib/adept/device.rb +127 -0
- data/lib/adept/error.rb +4 -0
- data/lib/adept/jtag/connection.rb +404 -0
- data/lib/adept/jtag/device.rb +178 -0
- data/lib/adept/jtag/devices/fpga.rb +162 -0
- data/lib/adept/jtag/devices/null.rb +0 -0
- data/lib/adept/jtag/devices/platform_flash.rb +23 -0
- data/lib/adept/jtag/devices.rb +2 -0
- data/lib/adept/jtag/error.rb +8 -0
- data/lib/adept/jtag/tap_state.rb +67 -0
- data/lib/adept/jtag/tap_states.rb +52 -0
- data/lib/adept/jtag.rb +11 -0
- data/lib/adept/low_level/connection.rb +59 -0
- data/lib/adept/low_level/device.rb +43 -0
- data/lib/adept/low_level/device_error.rb +22 -0
- data/lib/adept/low_level/device_manager.rb +142 -0
- data/lib/adept/low_level/enhanced_parallel.rb +151 -0
- data/lib/adept/low_level/error_handler.rb +60 -0
- data/lib/adept/low_level/jtag.rb +379 -0
- data/lib/adept/low_level/library.rb +173 -0
- data/lib/adept/low_level.rb +4 -0
- data/lib/adept/version.rb +3 -0
- data/lib/adept.rb +11 -0
- data/spec/firmware/epp_loopback.bit +0 -0
- data/spec/lib/adept/data_formats/bitstream_spec.rb +95 -0
- data/spec/lib/adept/data_formats/data_factories_spec.rb +42 -0
- data/spec/lib/adept/device_spec.rb +88 -0
- data/spec/lib/adept/jtag/connection_spec.rb +433 -0
- data/spec/lib/adept/jtag/device_spec.rb +107 -0
- data/spec/lib/adept/jtag/devices/fpga_spec.rb +71 -0
- data/spec/lib/adept/low_level/enhanced_parallel_spec.rb +72 -0
- data/spec/lib/adept/low_level/jtag_spec.rb +204 -0
- data/spec/spec_helpers.rb +25 -0
- metadata +240 -0
@@ -0,0 +1,355 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
2
|
+
<project xmlns="http://www.xilinx.com/XMLSchema" xmlns:xil_pn="http://www.xilinx.com/XMLSchema">
|
3
|
+
|
4
|
+
<header>
|
5
|
+
<!-- ISE source project file created by Project Navigator. -->
|
6
|
+
<!-- -->
|
7
|
+
<!-- This file contains project source information including a list of -->
|
8
|
+
<!-- project source files, project and process properties. This file, -->
|
9
|
+
<!-- along with the project source files, is sufficient to open and -->
|
10
|
+
<!-- implement in ISE Project Navigator. -->
|
11
|
+
<!-- -->
|
12
|
+
<!-- Copyright (c) 1995-2012 Xilinx, Inc. All rights reserved. -->
|
13
|
+
</header>
|
14
|
+
|
15
|
+
<version xil_pn:ise_version="14.1" xil_pn:schema_version="2"/>
|
16
|
+
|
17
|
+
<files>
|
18
|
+
<file xil_pn:name="fifo.vhd" xil_pn:type="FILE_VHDL">
|
19
|
+
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="1"/>
|
20
|
+
<association xil_pn:name="Implementation" xil_pn:seqID="0"/>
|
21
|
+
</file>
|
22
|
+
<file xil_pn:name="tests/fifo_testbench.vhdl" xil_pn:type="FILE_VHDL">
|
23
|
+
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="2"/>
|
24
|
+
<association xil_pn:name="PostMapSimulation" xil_pn:seqID="5"/>
|
25
|
+
<association xil_pn:name="PostRouteSimulation" xil_pn:seqID="5"/>
|
26
|
+
<association xil_pn:name="PostTranslateSimulation" xil_pn:seqID="5"/>
|
27
|
+
</file>
|
28
|
+
<file xil_pn:name="epp_controller.vhd" xil_pn:type="FILE_VHDL">
|
29
|
+
<association xil_pn:name="BehavioralSimulation" xil_pn:seqID="12"/>
|
30
|
+
<association xil_pn:name="Implementation" xil_pn:seqID="1"/>
|
31
|
+
</file>
|
32
|
+
<file xil_pn:name="Basys2_100_250General.ucf" xil_pn:type="FILE_UCF">
|
33
|
+
<association xil_pn:name="Implementation" xil_pn:seqID="0"/>
|
34
|
+
</file>
|
35
|
+
</files>
|
36
|
+
|
37
|
+
<properties>
|
38
|
+
<property xil_pn:name="Add I/O Buffers" xil_pn:value="true" xil_pn:valueState="default"/>
|
39
|
+
<property xil_pn:name="Allow Logic Optimization Across Hierarchy" xil_pn:value="false" xil_pn:valueState="default"/>
|
40
|
+
<property xil_pn:name="Allow SelectMAP Pins to Persist" xil_pn:value="false" xil_pn:valueState="default"/>
|
41
|
+
<property xil_pn:name="Allow Unexpanded Blocks" xil_pn:value="false" xil_pn:valueState="default"/>
|
42
|
+
<property xil_pn:name="Allow Unmatched LOC Constraints" xil_pn:value="false" xil_pn:valueState="default"/>
|
43
|
+
<property xil_pn:name="Allow Unmatched Timing Group Constraints" xil_pn:value="false" xil_pn:valueState="default"/>
|
44
|
+
<property xil_pn:name="Analysis Effort Level" xil_pn:value="Standard" xil_pn:valueState="default"/>
|
45
|
+
<property xil_pn:name="Asynchronous To Synchronous" xil_pn:value="false" xil_pn:valueState="default"/>
|
46
|
+
<property xil_pn:name="Auto Implementation Compile Order" xil_pn:value="true" xil_pn:valueState="default"/>
|
47
|
+
<property xil_pn:name="Auto Implementation Top" xil_pn:value="false" xil_pn:valueState="non-default"/>
|
48
|
+
<property xil_pn:name="Automatic BRAM Packing" xil_pn:value="false" xil_pn:valueState="default"/>
|
49
|
+
<property xil_pn:name="Automatically Insert glbl Module in the Netlist" xil_pn:value="true" xil_pn:valueState="default"/>
|
50
|
+
<property xil_pn:name="Automatically Run Generate Target PROM/ACE File" xil_pn:value="false" xil_pn:valueState="default"/>
|
51
|
+
<property xil_pn:name="BRAM Utilization Ratio" xil_pn:value="100" xil_pn:valueState="default"/>
|
52
|
+
<property xil_pn:name="Bring Out Global Set/Reset Net as a Port" xil_pn:value="false" xil_pn:valueState="default"/>
|
53
|
+
<property xil_pn:name="Bring Out Global Tristate Net as a Port" xil_pn:value="false" xil_pn:valueState="default"/>
|
54
|
+
<property xil_pn:name="Bus Delimiter" xil_pn:value="<>" xil_pn:valueState="default"/>
|
55
|
+
<property xil_pn:name="CLB Pack Factor Percentage" xil_pn:value="100" xil_pn:valueState="default"/>
|
56
|
+
<property xil_pn:name="Case" xil_pn:value="Maintain" xil_pn:valueState="default"/>
|
57
|
+
<property xil_pn:name="Case Implementation Style" xil_pn:value="None" xil_pn:valueState="default"/>
|
58
|
+
<property xil_pn:name="Change Device Speed To" xil_pn:value="-5" xil_pn:valueState="default"/>
|
59
|
+
<property xil_pn:name="Change Device Speed To Post Trace" xil_pn:value="-5" xil_pn:valueState="default"/>
|
60
|
+
<property xil_pn:name="Combinatorial Logic Optimization" xil_pn:value="false" xil_pn:valueState="default"/>
|
61
|
+
<property xil_pn:name="Compile EDK Simulation Library" xil_pn:value="false" xil_pn:valueState="default"/>
|
62
|
+
<property xil_pn:name="Compile SIMPRIM (Timing) Simulation Library" xil_pn:value="true" xil_pn:valueState="default"/>
|
63
|
+
<property xil_pn:name="Compile UNISIM (Functional) Simulation Library" xil_pn:value="true" xil_pn:valueState="default"/>
|
64
|
+
<property xil_pn:name="Compile XilinxCoreLib (CORE Generator) Simulation Library" xil_pn:value="true" xil_pn:valueState="default"/>
|
65
|
+
<property xil_pn:name="Compile for HDL Debugging" xil_pn:value="true" xil_pn:valueState="default"/>
|
66
|
+
<property xil_pn:name="Configuration Clk (Configuration Pins)" xil_pn:value="Pull Up" xil_pn:valueState="default"/>
|
67
|
+
<property xil_pn:name="Configuration Pin Done" xil_pn:value="Pull Up" xil_pn:valueState="default"/>
|
68
|
+
<property xil_pn:name="Configuration Pin M0" xil_pn:value="Pull Up" xil_pn:valueState="default"/>
|
69
|
+
<property xil_pn:name="Configuration Pin M1" xil_pn:value="Pull Up" xil_pn:valueState="default"/>
|
70
|
+
<property xil_pn:name="Configuration Pin M2" xil_pn:value="Pull Up" xil_pn:valueState="default"/>
|
71
|
+
<property xil_pn:name="Configuration Pin Program" xil_pn:value="Pull Up" xil_pn:valueState="default"/>
|
72
|
+
<property xil_pn:name="Configuration Rate" xil_pn:value="Default (1)" xil_pn:valueState="default"/>
|
73
|
+
<property xil_pn:name="Correlate Output to Input Design" xil_pn:value="false" xil_pn:valueState="default"/>
|
74
|
+
<property xil_pn:name="Create ASCII Configuration File" xil_pn:value="false" xil_pn:valueState="default"/>
|
75
|
+
<property xil_pn:name="Create Binary Configuration File" xil_pn:value="false" xil_pn:valueState="default"/>
|
76
|
+
<property xil_pn:name="Create Bit File" xil_pn:value="true" xil_pn:valueState="default"/>
|
77
|
+
<property xil_pn:name="Create I/O Pads from Ports" xil_pn:value="false" xil_pn:valueState="default"/>
|
78
|
+
<property xil_pn:name="Create IEEE 1532 Configuration File" xil_pn:value="false" xil_pn:valueState="default"/>
|
79
|
+
<property xil_pn:name="Create Logic Allocation File" xil_pn:value="false" xil_pn:valueState="default"/>
|
80
|
+
<property xil_pn:name="Create Mask File" xil_pn:value="false" xil_pn:valueState="default"/>
|
81
|
+
<property xil_pn:name="Create ReadBack Data Files" xil_pn:value="false" xil_pn:valueState="default"/>
|
82
|
+
<property xil_pn:name="Cross Clock Analysis" xil_pn:value="false" xil_pn:valueState="default"/>
|
83
|
+
<property xil_pn:name="DCI Update Mode" xil_pn:value="As Required" xil_pn:valueState="default"/>
|
84
|
+
<property xil_pn:name="DSP Utilization Ratio" xil_pn:value="100" xil_pn:valueState="default"/>
|
85
|
+
<property xil_pn:name="Decoder Extraction" xil_pn:value="true" xil_pn:valueState="default"/>
|
86
|
+
<property xil_pn:name="Delay Values To Be Read from SDF" xil_pn:value="Setup Time" xil_pn:valueState="default"/>
|
87
|
+
<property xil_pn:name="Device" xil_pn:value="xc3s250e" xil_pn:valueState="non-default"/>
|
88
|
+
<property xil_pn:name="Device Family" xil_pn:value="Spartan3E" xil_pn:valueState="non-default"/>
|
89
|
+
<property xil_pn:name="Device Speed Grade/Select ABS Minimum" xil_pn:value="-5" xil_pn:valueState="default"/>
|
90
|
+
<property xil_pn:name="Disable Detailed Package Model Insertion" xil_pn:value="false" xil_pn:valueState="default"/>
|
91
|
+
<property xil_pn:name="Do Not Escape Signal and Instance Names in Netlist" xil_pn:value="false" xil_pn:valueState="default"/>
|
92
|
+
<property xil_pn:name="Done (Output Events)" xil_pn:value="Default (4)" xil_pn:valueState="default"/>
|
93
|
+
<property xil_pn:name="Drive Done Pin High" xil_pn:value="false" xil_pn:valueState="default"/>
|
94
|
+
<property xil_pn:name="Enable BitStream Compression" xil_pn:value="false" xil_pn:valueState="default"/>
|
95
|
+
<property xil_pn:name="Enable Cyclic Redundancy Checking (CRC)" xil_pn:value="true" xil_pn:valueState="default"/>
|
96
|
+
<property xil_pn:name="Enable Debugging of Serial Mode BitStream" xil_pn:value="false" xil_pn:valueState="default"/>
|
97
|
+
<property xil_pn:name="Enable Hardware Co-Simulation" xil_pn:value="false" xil_pn:valueState="default"/>
|
98
|
+
<property xil_pn:name="Enable Internal Done Pipe" xil_pn:value="true" xil_pn:valueState="non-default"/>
|
99
|
+
<property xil_pn:name="Enable Message Filtering" xil_pn:value="false" xil_pn:valueState="default"/>
|
100
|
+
<property xil_pn:name="Enable Multi-Threading" xil_pn:value="Off" xil_pn:valueState="default"/>
|
101
|
+
<property xil_pn:name="Enable Outputs (Output Events)" xil_pn:value="Default (5)" xil_pn:valueState="default"/>
|
102
|
+
<property xil_pn:name="Equivalent Register Removal XST" xil_pn:value="true" xil_pn:valueState="default"/>
|
103
|
+
<property xil_pn:name="Evaluation Development Board" xil_pn:value="None Specified" xil_pn:valueState="default"/>
|
104
|
+
<property xil_pn:name="Exclude Compilation of Deprecated EDK Cores" xil_pn:value="true" xil_pn:valueState="default"/>
|
105
|
+
<property xil_pn:name="Exclude Compilation of EDK Sub-Libraries" xil_pn:value="false" xil_pn:valueState="default"/>
|
106
|
+
<property xil_pn:name="Extra Effort" xil_pn:value="None" xil_pn:valueState="default"/>
|
107
|
+
<property xil_pn:name="Extra Effort (Highest PAR level only)" xil_pn:value="None" xil_pn:valueState="default"/>
|
108
|
+
<property xil_pn:name="FPGA Start-Up Clock" xil_pn:value="JTAG Clock" xil_pn:valueState="non-default"/>
|
109
|
+
<property xil_pn:name="FSM Encoding Algorithm" xil_pn:value="Auto" xil_pn:valueState="default"/>
|
110
|
+
<property xil_pn:name="FSM Style" xil_pn:value="LUT" xil_pn:valueState="default"/>
|
111
|
+
<property xil_pn:name="Filter Files From Compile Order" xil_pn:value="true" xil_pn:valueState="default"/>
|
112
|
+
<property xil_pn:name="Flatten Output Netlist" xil_pn:value="false" xil_pn:valueState="default"/>
|
113
|
+
<property xil_pn:name="Functional Model Target Language ArchWiz" xil_pn:value="Verilog" xil_pn:valueState="default"/>
|
114
|
+
<property xil_pn:name="Functional Model Target Language Coregen" xil_pn:value="Verilog" xil_pn:valueState="default"/>
|
115
|
+
<property xil_pn:name="Functional Model Target Language Schematic" xil_pn:value="Verilog" xil_pn:valueState="default"/>
|
116
|
+
<property xil_pn:name="Generate Architecture Only (No Entity Declaration)" xil_pn:value="false" xil_pn:valueState="default"/>
|
117
|
+
<property xil_pn:name="Generate Asynchronous Delay Report" xil_pn:value="false" xil_pn:valueState="default"/>
|
118
|
+
<property xil_pn:name="Generate Clock Region Report" xil_pn:value="false" xil_pn:valueState="default"/>
|
119
|
+
<property xil_pn:name="Generate Constraints Interaction Report" xil_pn:value="false" xil_pn:valueState="default"/>
|
120
|
+
<property xil_pn:name="Generate Constraints Interaction Report Post Trace" xil_pn:value="false" xil_pn:valueState="default"/>
|
121
|
+
<property xil_pn:name="Generate Datasheet Section" xil_pn:value="true" xil_pn:valueState="default"/>
|
122
|
+
<property xil_pn:name="Generate Datasheet Section Post Trace" xil_pn:value="true" xil_pn:valueState="default"/>
|
123
|
+
<property xil_pn:name="Generate Detailed MAP Report" xil_pn:value="false" xil_pn:valueState="default"/>
|
124
|
+
<property xil_pn:name="Generate Multiple Hierarchical Netlist Files" xil_pn:value="false" xil_pn:valueState="default"/>
|
125
|
+
<property xil_pn:name="Generate Post-Place & Route Power Report" xil_pn:value="false" xil_pn:valueState="default"/>
|
126
|
+
<property xil_pn:name="Generate Post-Place & Route Simulation Model" xil_pn:value="false" xil_pn:valueState="default"/>
|
127
|
+
<property xil_pn:name="Generate RTL Schematic" xil_pn:value="Yes" xil_pn:valueState="default"/>
|
128
|
+
<property xil_pn:name="Generate SAIF File for Power Optimization/Estimation Par" xil_pn:value="false" xil_pn:valueState="default"/>
|
129
|
+
<property xil_pn:name="Generate Testbench File" xil_pn:value="false" xil_pn:valueState="default"/>
|
130
|
+
<property xil_pn:name="Generate Timegroups Section" xil_pn:value="false" xil_pn:valueState="default"/>
|
131
|
+
<property xil_pn:name="Generate Timegroups Section Post Trace" xil_pn:value="false" xil_pn:valueState="default"/>
|
132
|
+
<property xil_pn:name="Generics, Parameters" xil_pn:value="" xil_pn:valueState="default"/>
|
133
|
+
<property xil_pn:name="Global Optimization Goal" xil_pn:value="AllClockNets" xil_pn:valueState="default"/>
|
134
|
+
<property xil_pn:name="Global Set/Reset Port Name" xil_pn:value="GSR_PORT" xil_pn:valueState="default"/>
|
135
|
+
<property xil_pn:name="Global Tristate Port Name" xil_pn:value="GTS_PORT" xil_pn:valueState="default"/>
|
136
|
+
<property xil_pn:name="Hierarchy Separator" xil_pn:value="/" xil_pn:valueState="default"/>
|
137
|
+
<property xil_pn:name="ISim UUT Instance Name" xil_pn:value="UUT" xil_pn:valueState="default"/>
|
138
|
+
<property xil_pn:name="Ignore User Timing Constraints Map" xil_pn:value="false" xil_pn:valueState="default"/>
|
139
|
+
<property xil_pn:name="Ignore User Timing Constraints Par" xil_pn:value="false" xil_pn:valueState="default"/>
|
140
|
+
<property xil_pn:name="Implementation Top" xil_pn:value="Architecture|TopLevel|Behavioural" xil_pn:valueState="non-default"/>
|
141
|
+
<property xil_pn:name="Implementation Top File" xil_pn:value="epp_controller.vhd" xil_pn:valueState="non-default"/>
|
142
|
+
<property xil_pn:name="Implementation Top Instance Path" xil_pn:value="/TopLevel" xil_pn:valueState="non-default"/>
|
143
|
+
<property xil_pn:name="Include 'uselib Directive in Verilog File" xil_pn:value="false" xil_pn:valueState="default"/>
|
144
|
+
<property xil_pn:name="Include SIMPRIM Models in Verilog File" xil_pn:value="false" xil_pn:valueState="default"/>
|
145
|
+
<property xil_pn:name="Include UNISIM Models in Verilog File" xil_pn:value="false" xil_pn:valueState="default"/>
|
146
|
+
<property xil_pn:name="Include sdf_annotate task in Verilog File" xil_pn:value="true" xil_pn:valueState="default"/>
|
147
|
+
<property xil_pn:name="Incremental Compilation" xil_pn:value="true" xil_pn:valueState="default"/>
|
148
|
+
<property xil_pn:name="Insert Buffers to Prevent Pulse Swallowing" xil_pn:value="true" xil_pn:valueState="default"/>
|
149
|
+
<property xil_pn:name="Instantiation Template Target Language Xps" xil_pn:value="Verilog" xil_pn:valueState="default"/>
|
150
|
+
<property xil_pn:name="JTAG Pin TCK" xil_pn:value="Pull Up" xil_pn:valueState="default"/>
|
151
|
+
<property xil_pn:name="JTAG Pin TDI" xil_pn:value="Pull Up" xil_pn:valueState="default"/>
|
152
|
+
<property xil_pn:name="JTAG Pin TDO" xil_pn:value="Pull Up" xil_pn:valueState="default"/>
|
153
|
+
<property xil_pn:name="JTAG Pin TMS" xil_pn:value="Pull Up" xil_pn:valueState="default"/>
|
154
|
+
<property xil_pn:name="Keep Hierarchy" xil_pn:value="No" xil_pn:valueState="default"/>
|
155
|
+
<property xil_pn:name="Language" xil_pn:value="VHDL" xil_pn:valueState="default"/>
|
156
|
+
<property xil_pn:name="Last Applied Goal" xil_pn:value="Balanced" xil_pn:valueState="default"/>
|
157
|
+
<property xil_pn:name="Last Applied Strategy" xil_pn:value="Xilinx Default (unlocked)" xil_pn:valueState="default"/>
|
158
|
+
<property xil_pn:name="Last Unlock Status" xil_pn:value="false" xil_pn:valueState="default"/>
|
159
|
+
<property xil_pn:name="Launch SDK after Export" xil_pn:value="true" xil_pn:valueState="default"/>
|
160
|
+
<property xil_pn:name="Library for Verilog Sources" xil_pn:value="" xil_pn:valueState="default"/>
|
161
|
+
<property xil_pn:name="Load glbl" xil_pn:value="true" xil_pn:valueState="default"/>
|
162
|
+
<property xil_pn:name="Logical Shifter Extraction" xil_pn:value="true" xil_pn:valueState="default"/>
|
163
|
+
<property xil_pn:name="Manual Implementation Compile Order" xil_pn:value="false" xil_pn:valueState="default"/>
|
164
|
+
<property xil_pn:name="Map Effort Level" xil_pn:value="High" xil_pn:valueState="default"/>
|
165
|
+
<property xil_pn:name="Map Slice Logic into Unused Block RAMs" xil_pn:value="false" xil_pn:valueState="default"/>
|
166
|
+
<property xil_pn:name="Max Fanout" xil_pn:value="100000" xil_pn:valueState="non-default"/>
|
167
|
+
<property xil_pn:name="Maximum Number of Lines in Report" xil_pn:value="1000" xil_pn:valueState="default"/>
|
168
|
+
<property xil_pn:name="Maximum Signal Name Length" xil_pn:value="20" xil_pn:valueState="default"/>
|
169
|
+
<property xil_pn:name="Move First Flip-Flop Stage" xil_pn:value="true" xil_pn:valueState="default"/>
|
170
|
+
<property xil_pn:name="Move Last Flip-Flop Stage" xil_pn:value="true" xil_pn:valueState="default"/>
|
171
|
+
<property xil_pn:name="Multiplier Style" xil_pn:value="Auto" xil_pn:valueState="default"/>
|
172
|
+
<property xil_pn:name="Mux Extraction" xil_pn:value="Yes" xil_pn:valueState="default"/>
|
173
|
+
<property xil_pn:name="Mux Style" xil_pn:value="Auto" xil_pn:valueState="default"/>
|
174
|
+
<property xil_pn:name="Netlist Hierarchy" xil_pn:value="As Optimized" xil_pn:valueState="default"/>
|
175
|
+
<property xil_pn:name="Netlist Translation Type" xil_pn:value="Timestamp" xil_pn:valueState="default"/>
|
176
|
+
<property xil_pn:name="Number of Clock Buffers" xil_pn:value="24" xil_pn:valueState="default"/>
|
177
|
+
<property xil_pn:name="Number of Paths in Error/Verbose Report" xil_pn:value="3" xil_pn:valueState="default"/>
|
178
|
+
<property xil_pn:name="Number of Paths in Error/Verbose Report Post Trace" xil_pn:value="3" xil_pn:valueState="default"/>
|
179
|
+
<property xil_pn:name="Optimization Effort" xil_pn:value="Normal" xil_pn:valueState="default"/>
|
180
|
+
<property xil_pn:name="Optimization Goal" xil_pn:value="Speed" xil_pn:valueState="default"/>
|
181
|
+
<property xil_pn:name="Optimization Strategy (Cover Mode)" xil_pn:value="Area" xil_pn:valueState="default"/>
|
182
|
+
<property xil_pn:name="Optimize Instantiated Primitives" xil_pn:value="false" xil_pn:valueState="default"/>
|
183
|
+
<property xil_pn:name="Other Bitgen Command Line Options" xil_pn:value="" xil_pn:valueState="default"/>
|
184
|
+
<property xil_pn:name="Other Compiler Options" xil_pn:value="" xil_pn:valueState="default"/>
|
185
|
+
<property xil_pn:name="Other Compiler Options Map" xil_pn:value="" xil_pn:valueState="default"/>
|
186
|
+
<property xil_pn:name="Other Compiler Options Par" xil_pn:value="" xil_pn:valueState="default"/>
|
187
|
+
<property xil_pn:name="Other Compiler Options Translate" xil_pn:value="" xil_pn:valueState="default"/>
|
188
|
+
<property xil_pn:name="Other Compxlib Command Line Options" xil_pn:value="" xil_pn:valueState="default"/>
|
189
|
+
<property xil_pn:name="Other Map Command Line Options" xil_pn:value="" xil_pn:valueState="default"/>
|
190
|
+
<property xil_pn:name="Other NETGEN Command Line Options" xil_pn:value="" xil_pn:valueState="default"/>
|
191
|
+
<property xil_pn:name="Other Ngdbuild Command Line Options" xil_pn:value="" xil_pn:valueState="default"/>
|
192
|
+
<property xil_pn:name="Other Place & Route Command Line Options" xil_pn:value="" xil_pn:valueState="default"/>
|
193
|
+
<property xil_pn:name="Other Simulator Commands Behavioral" xil_pn:value="" xil_pn:valueState="default"/>
|
194
|
+
<property xil_pn:name="Other Simulator Commands Post-Map" xil_pn:value="" xil_pn:valueState="default"/>
|
195
|
+
<property xil_pn:name="Other Simulator Commands Post-Route" xil_pn:value="" xil_pn:valueState="default"/>
|
196
|
+
<property xil_pn:name="Other Simulator Commands Post-Translate" xil_pn:value="" xil_pn:valueState="default"/>
|
197
|
+
<property xil_pn:name="Other XPWR Command Line Options" xil_pn:value="" xil_pn:valueState="default"/>
|
198
|
+
<property xil_pn:name="Other XST Command Line Options" xil_pn:value="" xil_pn:valueState="default"/>
|
199
|
+
<property xil_pn:name="Output Extended Identifiers" xil_pn:value="false" xil_pn:valueState="default"/>
|
200
|
+
<property xil_pn:name="Output File Name" xil_pn:value="TopLevel" xil_pn:valueState="default"/>
|
201
|
+
<property xil_pn:name="Overwrite Compiled Libraries" xil_pn:value="false" xil_pn:valueState="default"/>
|
202
|
+
<property xil_pn:name="Pack I/O Registers into IOBs" xil_pn:value="Auto" xil_pn:valueState="default"/>
|
203
|
+
<property xil_pn:name="Pack I/O Registers/Latches into IOBs" xil_pn:value="Off" xil_pn:valueState="default"/>
|
204
|
+
<property xil_pn:name="Package" xil_pn:value="cp132" xil_pn:valueState="non-default"/>
|
205
|
+
<property xil_pn:name="Perform Advanced Analysis" xil_pn:value="false" xil_pn:valueState="default"/>
|
206
|
+
<property xil_pn:name="Perform Advanced Analysis Post Trace" xil_pn:value="false" xil_pn:valueState="default"/>
|
207
|
+
<property xil_pn:name="Perform Timing-Driven Packing and Placement" xil_pn:value="false" xil_pn:valueState="default"/>
|
208
|
+
<property xil_pn:name="Place & Route Effort Level (Overall)" xil_pn:value="High" xil_pn:valueState="default"/>
|
209
|
+
<property xil_pn:name="Place And Route Mode" xil_pn:value="Normal Place and Route" xil_pn:valueState="default"/>
|
210
|
+
<property xil_pn:name="Placer Effort Level (Overrides Overall Level)" xil_pn:value="None" xil_pn:valueState="default"/>
|
211
|
+
<property xil_pn:name="Port to be used" xil_pn:value="Auto - default" xil_pn:valueState="default"/>
|
212
|
+
<property xil_pn:name="Post Map Simulation Model Name" xil_pn:value="TopLevel_map.v" xil_pn:valueState="default"/>
|
213
|
+
<property xil_pn:name="Post Place & Route Simulation Model Name" xil_pn:value="TopLevel_timesim.v" xil_pn:valueState="default"/>
|
214
|
+
<property xil_pn:name="Post Synthesis Simulation Model Name" xil_pn:value="TopLevel_synthesis.v" xil_pn:valueState="default"/>
|
215
|
+
<property xil_pn:name="Post Translate Simulation Model Name" xil_pn:value="TopLevel_translate.v" xil_pn:valueState="default"/>
|
216
|
+
<property xil_pn:name="Power Reduction Map" xil_pn:value="false" xil_pn:valueState="default"/>
|
217
|
+
<property xil_pn:name="Power Reduction Par" xil_pn:value="false" xil_pn:valueState="default"/>
|
218
|
+
<property xil_pn:name="Preferred Language" xil_pn:value="Verilog" xil_pn:valueState="default"/>
|
219
|
+
<property xil_pn:name="Priority Encoder Extraction" xil_pn:value="Yes" xil_pn:valueState="default"/>
|
220
|
+
<property xil_pn:name="Produce Verbose Report" xil_pn:value="false" xil_pn:valueState="default"/>
|
221
|
+
<property xil_pn:name="Project Description" xil_pn:value="Example design for transmission of data "streams" over the Digilent EPP protocol. Useful for simulating a simple serial ("RS-232") connection to a PC." xil_pn:valueState="non-default"/>
|
222
|
+
<property xil_pn:name="Property Specification in Project File" xil_pn:value="Store all values" xil_pn:valueState="default"/>
|
223
|
+
<property xil_pn:name="RAM Extraction" xil_pn:value="true" xil_pn:valueState="default"/>
|
224
|
+
<property xil_pn:name="RAM Style" xil_pn:value="Auto" xil_pn:valueState="default"/>
|
225
|
+
<property xil_pn:name="ROM Extraction" xil_pn:value="true" xil_pn:valueState="default"/>
|
226
|
+
<property xil_pn:name="ROM Style" xil_pn:value="Auto" xil_pn:valueState="default"/>
|
227
|
+
<property xil_pn:name="Read Cores" xil_pn:value="true" xil_pn:valueState="default"/>
|
228
|
+
<property xil_pn:name="Regenerate Core" xil_pn:value="Under Current Project Setting" xil_pn:valueState="default"/>
|
229
|
+
<property xil_pn:name="Register Balancing" xil_pn:value="No" xil_pn:valueState="default"/>
|
230
|
+
<property xil_pn:name="Register Duplication" xil_pn:value="Off" xil_pn:valueState="default"/>
|
231
|
+
<property xil_pn:name="Register Duplication Xst" xil_pn:value="true" xil_pn:valueState="default"/>
|
232
|
+
<property xil_pn:name="Release Write Enable (Output Events)" xil_pn:value="Default (6)" xil_pn:valueState="default"/>
|
233
|
+
<property xil_pn:name="Rename Design Instance in Testbench File to" xil_pn:value="UUT" xil_pn:valueState="default"/>
|
234
|
+
<property xil_pn:name="Rename Top Level Architecture To" xil_pn:value="Structure" xil_pn:valueState="default"/>
|
235
|
+
<property xil_pn:name="Rename Top Level Entity to" xil_pn:value="" xil_pn:valueState="default"/>
|
236
|
+
<property xil_pn:name="Rename Top Level Module To" xil_pn:value="" xil_pn:valueState="default"/>
|
237
|
+
<property xil_pn:name="Report Fastest Path(s) in Each Constraint" xil_pn:value="true" xil_pn:valueState="default"/>
|
238
|
+
<property xil_pn:name="Report Fastest Path(s) in Each Constraint Post Trace" xil_pn:value="true" xil_pn:valueState="default"/>
|
239
|
+
<property xil_pn:name="Report Paths by Endpoint" xil_pn:value="3" xil_pn:valueState="default"/>
|
240
|
+
<property xil_pn:name="Report Paths by Endpoint Post Trace" xil_pn:value="3" xil_pn:valueState="default"/>
|
241
|
+
<property xil_pn:name="Report Type" xil_pn:value="Verbose Report" xil_pn:valueState="default"/>
|
242
|
+
<property xil_pn:name="Report Type Post Trace" xil_pn:value="Verbose Report" xil_pn:valueState="default"/>
|
243
|
+
<property xil_pn:name="Report Unconstrained Paths" xil_pn:value="" xil_pn:valueState="default"/>
|
244
|
+
<property xil_pn:name="Report Unconstrained Paths Post Trace" xil_pn:value="" xil_pn:valueState="default"/>
|
245
|
+
<property xil_pn:name="Reset DCM if SHUTDOWN & AGHIGH performed" xil_pn:value="false" xil_pn:valueState="default"/>
|
246
|
+
<property xil_pn:name="Reset On Configuration Pulse Width" xil_pn:value="100" xil_pn:valueState="default"/>
|
247
|
+
<property xil_pn:name="Resource Sharing" xil_pn:value="true" xil_pn:valueState="default"/>
|
248
|
+
<property xil_pn:name="Retain Hierarchy" xil_pn:value="true" xil_pn:valueState="default"/>
|
249
|
+
<property xil_pn:name="Revision Select" xil_pn:value="00" xil_pn:valueState="default"/>
|
250
|
+
<property xil_pn:name="Revision Select Tristate" xil_pn:value="Disable" xil_pn:valueState="default"/>
|
251
|
+
<property xil_pn:name="Router Effort Level (Overrides Overall Level)" xil_pn:value="None" xil_pn:valueState="default"/>
|
252
|
+
<property xil_pn:name="Run Design Rules Checker (DRC)" xil_pn:value="true" xil_pn:valueState="default"/>
|
253
|
+
<property xil_pn:name="Run for Specified Time" xil_pn:value="true" xil_pn:valueState="default"/>
|
254
|
+
<property xil_pn:name="Run for Specified Time Map" xil_pn:value="true" xil_pn:valueState="default"/>
|
255
|
+
<property xil_pn:name="Run for Specified Time Par" xil_pn:value="true" xil_pn:valueState="default"/>
|
256
|
+
<property xil_pn:name="Run for Specified Time Translate" xil_pn:value="true" xil_pn:valueState="default"/>
|
257
|
+
<property xil_pn:name="Safe Implementation" xil_pn:value="No" xil_pn:valueState="default"/>
|
258
|
+
<property xil_pn:name="Security" xil_pn:value="Enable Readback and Reconfiguration" xil_pn:valueState="default"/>
|
259
|
+
<property xil_pn:name="Selected Module Instance Name" xil_pn:value="/TopLevel" xil_pn:valueState="non-default"/>
|
260
|
+
<property xil_pn:name="Selected Simulation Root Source Node Behavioral" xil_pn:value="work.TopLevel" xil_pn:valueState="non-default"/>
|
261
|
+
<property xil_pn:name="Selected Simulation Root Source Node Post-Map" xil_pn:value="" xil_pn:valueState="default"/>
|
262
|
+
<property xil_pn:name="Selected Simulation Root Source Node Post-Route" xil_pn:value="" xil_pn:valueState="default"/>
|
263
|
+
<property xil_pn:name="Selected Simulation Root Source Node Post-Translate" xil_pn:value="" xil_pn:valueState="default"/>
|
264
|
+
<property xil_pn:name="Selected Simulation Source Node" xil_pn:value="UUT" xil_pn:valueState="default"/>
|
265
|
+
<property xil_pn:name="Shift Register Extraction" xil_pn:value="true" xil_pn:valueState="default"/>
|
266
|
+
<property xil_pn:name="Show All Models" xil_pn:value="false" xil_pn:valueState="default"/>
|
267
|
+
<property xil_pn:name="Simulation Model Target" xil_pn:value="Verilog" xil_pn:valueState="default"/>
|
268
|
+
<property xil_pn:name="Simulation Run Time ISim" xil_pn:value="1000 ns" xil_pn:valueState="default"/>
|
269
|
+
<property xil_pn:name="Simulation Run Time Map" xil_pn:value="1000 ns" xil_pn:valueState="default"/>
|
270
|
+
<property xil_pn:name="Simulation Run Time Par" xil_pn:value="1000 ns" xil_pn:valueState="default"/>
|
271
|
+
<property xil_pn:name="Simulation Run Time Translate" xil_pn:value="1000 ns" xil_pn:valueState="default"/>
|
272
|
+
<property xil_pn:name="Simulator" xil_pn:value="ISim (VHDL/Verilog)" xil_pn:valueState="default"/>
|
273
|
+
<property xil_pn:name="Slice Packing" xil_pn:value="true" xil_pn:valueState="default"/>
|
274
|
+
<property xil_pn:name="Slice Utilization Ratio" xil_pn:value="100" xil_pn:valueState="default"/>
|
275
|
+
<property xil_pn:name="Specify 'define Macro Name and Value" xil_pn:value="" xil_pn:valueState="default"/>
|
276
|
+
<property xil_pn:name="Specify Top Level Instance Names Behavioral" xil_pn:value="work.TopLevel" xil_pn:valueState="default"/>
|
277
|
+
<property xil_pn:name="Specify Top Level Instance Names Post-Map" xil_pn:value="Default" xil_pn:valueState="default"/>
|
278
|
+
<property xil_pn:name="Specify Top Level Instance Names Post-Route" xil_pn:value="Default" xil_pn:valueState="default"/>
|
279
|
+
<property xil_pn:name="Specify Top Level Instance Names Post-Translate" xil_pn:value="Default" xil_pn:valueState="default"/>
|
280
|
+
<property xil_pn:name="Speed Grade" xil_pn:value="-5" xil_pn:valueState="default"/>
|
281
|
+
<property xil_pn:name="Starting Placer Cost Table (1-100) Map" xil_pn:value="1" xil_pn:valueState="default"/>
|
282
|
+
<property xil_pn:name="Starting Placer Cost Table (1-100) Par" xil_pn:value="1" xil_pn:valueState="default"/>
|
283
|
+
<property xil_pn:name="Synthesis Tool" xil_pn:value="XST (VHDL/Verilog)" xil_pn:valueState="default"/>
|
284
|
+
<property xil_pn:name="Target Simulator" xil_pn:value="Please Specify" xil_pn:valueState="default"/>
|
285
|
+
<property xil_pn:name="Timing Mode Map" xil_pn:value="Non Timing Driven" xil_pn:valueState="default"/>
|
286
|
+
<property xil_pn:name="Timing Mode Par" xil_pn:value="Performance Evaluation" xil_pn:valueState="default"/>
|
287
|
+
<property xil_pn:name="Top-Level Module Name in Output Netlist" xil_pn:value="" xil_pn:valueState="default"/>
|
288
|
+
<property xil_pn:name="Top-Level Source Type" xil_pn:value="HDL" xil_pn:valueState="default"/>
|
289
|
+
<property xil_pn:name="Trim Unconnected Signals" xil_pn:value="true" xil_pn:valueState="default"/>
|
290
|
+
<property xil_pn:name="Tristate On Configuration Pulse Width" xil_pn:value="0" xil_pn:valueState="default"/>
|
291
|
+
<property xil_pn:name="Unused IOB Pins" xil_pn:value="Pull Down" xil_pn:valueState="default"/>
|
292
|
+
<property xil_pn:name="Use 64-bit PlanAhead on 64-bit Systems" xil_pn:value="true" xil_pn:valueState="default"/>
|
293
|
+
<property xil_pn:name="Use Clock Enable" xil_pn:value="Yes" xil_pn:valueState="default"/>
|
294
|
+
<property xil_pn:name="Use Custom Project File Behavioral" xil_pn:value="false" xil_pn:valueState="default"/>
|
295
|
+
<property xil_pn:name="Use Custom Project File Post-Map" xil_pn:value="false" xil_pn:valueState="default"/>
|
296
|
+
<property xil_pn:name="Use Custom Project File Post-Route" xil_pn:value="false" xil_pn:valueState="default"/>
|
297
|
+
<property xil_pn:name="Use Custom Project File Post-Translate" xil_pn:value="false" xil_pn:valueState="default"/>
|
298
|
+
<property xil_pn:name="Use Custom Simulation Command File Behavioral" xil_pn:value="false" xil_pn:valueState="default"/>
|
299
|
+
<property xil_pn:name="Use Custom Simulation Command File Map" xil_pn:value="false" xil_pn:valueState="default"/>
|
300
|
+
<property xil_pn:name="Use Custom Simulation Command File Par" xil_pn:value="false" xil_pn:valueState="default"/>
|
301
|
+
<property xil_pn:name="Use Custom Simulation Command File Translate" xil_pn:value="false" xil_pn:valueState="default"/>
|
302
|
+
<property xil_pn:name="Use Custom Waveform Configuration File Behav" xil_pn:value="false" xil_pn:valueState="default"/>
|
303
|
+
<property xil_pn:name="Use Custom Waveform Configuration File Map" xil_pn:value="false" xil_pn:valueState="default"/>
|
304
|
+
<property xil_pn:name="Use Custom Waveform Configuration File Par" xil_pn:value="false" xil_pn:valueState="default"/>
|
305
|
+
<property xil_pn:name="Use Custom Waveform Configuration File Translate" xil_pn:value="false" xil_pn:valueState="default"/>
|
306
|
+
<property xil_pn:name="Use LOC Constraints" xil_pn:value="true" xil_pn:valueState="default"/>
|
307
|
+
<property xil_pn:name="Use RLOC Constraints" xil_pn:value="Yes" xil_pn:valueState="default"/>
|
308
|
+
<property xil_pn:name="Use Smart Guide" xil_pn:value="false" xil_pn:valueState="default"/>
|
309
|
+
<property xil_pn:name="Use Synchronous Reset" xil_pn:value="Yes" xil_pn:valueState="default"/>
|
310
|
+
<property xil_pn:name="Use Synchronous Set" xil_pn:value="Yes" xil_pn:valueState="default"/>
|
311
|
+
<property xil_pn:name="Use Synthesis Constraints File" xil_pn:value="true" xil_pn:valueState="default"/>
|
312
|
+
<property xil_pn:name="User Browsed Strategy Files" xil_pn:value="" xil_pn:valueState="default"/>
|
313
|
+
<property xil_pn:name="UserID Code (8 Digit Hexadecimal)" xil_pn:value="0x12345678" xil_pn:valueState="non-default"/>
|
314
|
+
<property xil_pn:name="VHDL Source Analysis Standard" xil_pn:value="VHDL-93" xil_pn:valueState="default"/>
|
315
|
+
<property xil_pn:name="Value Range Check" xil_pn:value="false" xil_pn:valueState="default"/>
|
316
|
+
<property xil_pn:name="Verilog 2001 Xst" xil_pn:value="true" xil_pn:valueState="default"/>
|
317
|
+
<property xil_pn:name="Verilog Macros" xil_pn:value="" xil_pn:valueState="default"/>
|
318
|
+
<property xil_pn:name="Wait for DLL Lock (Output Events)" xil_pn:value="Default (NoWait)" xil_pn:valueState="default"/>
|
319
|
+
<property xil_pn:name="Working Directory" xil_pn:value="." xil_pn:valueState="non-default"/>
|
320
|
+
<property xil_pn:name="Write Timing Constraints" xil_pn:value="false" xil_pn:valueState="default"/>
|
321
|
+
<property xil_pn:name="XOR Collapsing" xil_pn:value="true" xil_pn:valueState="default"/>
|
322
|
+
<!-- -->
|
323
|
+
<!-- The following properties are for internal use only. These should not be modified.-->
|
324
|
+
<!-- -->
|
325
|
+
<property xil_pn:name="PROP_BehavioralSimTop" xil_pn:value="Architecture|fifo_testbench|behavior" xil_pn:valueState="non-default"/>
|
326
|
+
<property xil_pn:name="PROP_DesignName" xil_pn:value="epp_stream" xil_pn:valueState="non-default"/>
|
327
|
+
<property xil_pn:name="PROP_DevFamilyPMName" xil_pn:value="spartan3e" xil_pn:valueState="default"/>
|
328
|
+
<property xil_pn:name="PROP_FPGAConfiguration" xil_pn:value="FPGAConfiguration" xil_pn:valueState="default"/>
|
329
|
+
<property xil_pn:name="PROP_PostMapSimTop" xil_pn:value="" xil_pn:valueState="default"/>
|
330
|
+
<property xil_pn:name="PROP_PostParSimTop" xil_pn:value="" xil_pn:valueState="default"/>
|
331
|
+
<property xil_pn:name="PROP_PostSynthSimTop" xil_pn:value="" xil_pn:valueState="default"/>
|
332
|
+
<property xil_pn:name="PROP_PostXlateSimTop" xil_pn:value="" xil_pn:valueState="default"/>
|
333
|
+
<property xil_pn:name="PROP_PreSynthesis" xil_pn:value="PreSynthesis" xil_pn:valueState="default"/>
|
334
|
+
<property xil_pn:name="PROP_intProjectCreationTimestamp" xil_pn:value="2013-01-15T13:57:08" xil_pn:valueState="non-default"/>
|
335
|
+
<property xil_pn:name="PROP_intWbtProjectID" xil_pn:value="2D4D66F54E1C6D73CA5AD1640EB487B7" xil_pn:valueState="non-default"/>
|
336
|
+
<property xil_pn:name="PROP_intWorkingDirLocWRTProjDir" xil_pn:value="Same" xil_pn:valueState="non-default"/>
|
337
|
+
<property xil_pn:name="PROP_intWorkingDirUsed" xil_pn:value="No" xil_pn:valueState="non-default"/>
|
338
|
+
</properties>
|
339
|
+
|
340
|
+
<bindings>
|
341
|
+
<binding xil_pn:location="/TopLevel" xil_pn:name="Basys2_100_250General.ucf"/>
|
342
|
+
</bindings>
|
343
|
+
|
344
|
+
<libraries/>
|
345
|
+
|
346
|
+
<autoManagedFiles>
|
347
|
+
<!-- The following files are identified by `include statements in verilog -->
|
348
|
+
<!-- source files and are automatically managed by Project Navigator. -->
|
349
|
+
<!-- -->
|
350
|
+
<!-- Do not hand-edit this section, as it will be overwritten when the -->
|
351
|
+
<!-- project is analyzed based on files automatically identified as -->
|
352
|
+
<!-- include files. -->
|
353
|
+
</autoManagedFiles>
|
354
|
+
|
355
|
+
</project>
|
@@ -0,0 +1,178 @@
|
|
1
|
+
----------------------------------------------------------------------------------
|
2
|
+
-- Simple Synchronous FIFO
|
3
|
+
--
|
4
|
+
-- Author: Kyle J. Temkin, <ktemkin@binghamton.edu>
|
5
|
+
-- Copyright (c) Kyle J. Temkin, 2013 Binghamton University
|
6
|
+
--
|
7
|
+
-- This program is free software: you can redistribute it and/or modify
|
8
|
+
-- it under the terms of the GNU General Public License as published by
|
9
|
+
-- the Free Software Foundation, either version 3 of the License, or
|
10
|
+
-- (at your option) any later version.
|
11
|
+
--
|
12
|
+
-- This program is distributed in the hope that it will be useful,
|
13
|
+
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
+
-- GNU General Public License for more details.
|
16
|
+
--
|
17
|
+
-- You should have received a copy of the GNU General Public License
|
18
|
+
-- along with this program. If not, see <http://www.gnu.org/licenses/>.-
|
19
|
+
--
|
20
|
+
----------------------------------------------------------------------------------
|
21
|
+
library IEEE;
|
22
|
+
use IEEE.STD_LOGIC_1164.ALL;
|
23
|
+
|
24
|
+
-- Uncomment the following library declaration if using
|
25
|
+
-- arithmetic functions with Signed or Unsigned values
|
26
|
+
use IEEE.NUMERIC_STD.ALL;
|
27
|
+
|
28
|
+
-- Uncomment the following library declaration if instantiating
|
29
|
+
-- any Xilinx primitives in this code.
|
30
|
+
--library UNISIM;
|
31
|
+
--use UNISIM.VComponents.all;
|
32
|
+
|
33
|
+
entity fifo is
|
34
|
+
generic
|
35
|
+
(
|
36
|
+
-- The width of the _count_ signal, which will store the amount of
|
37
|
+
-- full elements in the FIFO. This signal is used to set the size
|
38
|
+
-- of the FIFO; a FIFO with count_bits equal to 5 will have a depth
|
39
|
+
-- of 31.
|
40
|
+
--
|
41
|
+
-- Note the odd number of elements; this allows us to use 0 as our
|
42
|
+
-- special "empty" case, which makes several things more efficient.
|
43
|
+
--
|
44
|
+
count_bits : integer := 5;
|
45
|
+
|
46
|
+
--The width of each element in the FIFO.
|
47
|
+
element_width : integer := 8
|
48
|
+
);
|
49
|
+
port(
|
50
|
+
|
51
|
+
--System clock.
|
52
|
+
clk : in std_logic;
|
53
|
+
|
54
|
+
--Active-high reset; clears the contents of the FIF0.
|
55
|
+
reset : in std_logic;
|
56
|
+
|
57
|
+
--The data inputs and outputs of for the FIFO.
|
58
|
+
data_in : in std_logic_vector(element_width - 1 downto 0);
|
59
|
+
data_out : out std_logic_vector(element_width - 1 downto 0);
|
60
|
+
|
61
|
+
--The total amount of data elements currently stored in the FIFO.
|
62
|
+
count : out std_logic_vector(count_bits - 1 downto 0);
|
63
|
+
|
64
|
+
--Enqueue and dequeue control signals; adds and removes an element
|
65
|
+
--from the FIFO, respectively.
|
66
|
+
enqueue : in std_logic;
|
67
|
+
dequeue : in std_logic;
|
68
|
+
|
69
|
+
--Status flags; note when the queue is empty (count == 0) and full
|
70
|
+
--(count is at its maximum value) respectively.
|
71
|
+
empty : out std_logic;
|
72
|
+
full : out std_logic
|
73
|
+
);
|
74
|
+
end fifo;
|
75
|
+
|
76
|
+
architecture Behavioral of fifo is
|
77
|
+
|
78
|
+
--Quick reference to the total amount of elements in the FIFO.
|
79
|
+
constant element_count : integer := (2 ** count_bits) - 1;
|
80
|
+
|
81
|
+
--Create an array type, which will represent the contents of the FIFO.
|
82
|
+
type queue is array (element_count - 1 downto 0)
|
83
|
+
of std_logic_vector(element_width - 1 downto 0);
|
84
|
+
|
85
|
+
|
86
|
+
--The array of registers which will house our FIFO data.
|
87
|
+
signal element : queue;
|
88
|
+
|
89
|
+
--Register wihch stores our current place in the FIFO.
|
90
|
+
signal count_reg : integer range 0 to element_count;
|
91
|
+
|
92
|
+
--Internal empty and full signals.
|
93
|
+
signal empty_sig, full_sig : std_logic;
|
94
|
+
|
95
|
+
--Internal "write allowed" signal.
|
96
|
+
signal enqueue_allowed : std_logic;
|
97
|
+
|
98
|
+
--Intermediary signal which stores the current write target for the FPGA.
|
99
|
+
signal enqueue_target : integer range 0 to element_count;
|
100
|
+
|
101
|
+
begin
|
102
|
+
|
103
|
+
--Count output; outputs the current value of the count signal.
|
104
|
+
count <= std_logic_vector(to_unsigned(count_reg, count_bits));
|
105
|
+
|
106
|
+
--Data output.
|
107
|
+
data_out <= element(0);
|
108
|
+
|
109
|
+
--Determine the register which will be updated on the next
|
110
|
+
--write operation.
|
111
|
+
enqueue_target <= count_reg - 1 when dequeue = '1' and enqueue = '1' else count_reg;
|
112
|
+
|
113
|
+
--Determine if a write operation should be allowed:
|
114
|
+
--We can write whenever there's space in the FIFO:
|
115
|
+
-- * When the FIFO isn't full, or;
|
116
|
+
-- * When we're going to _make_ room for the new element by dequeueing.
|
117
|
+
enqueue_allowed <= not full_sig or dequeue;
|
118
|
+
|
119
|
+
--Empty and full flags: indicate when the FIFO is empty and full,
|
120
|
+
--respectively.
|
121
|
+
empty_sig <= '1' when count_reg = 0 else '0';
|
122
|
+
full_sig <= '1' when count_reg = element_count else '0';
|
123
|
+
|
124
|
+
--Attach outputs to the values of the empty and full signals.
|
125
|
+
empty <= empty_sig;
|
126
|
+
full <= full_sig;
|
127
|
+
|
128
|
+
--
|
129
|
+
--Main "shift register" for the FIFO.
|
130
|
+
--
|
131
|
+
FIFO_BODY:
|
132
|
+
process(clk)
|
133
|
+
begin
|
134
|
+
|
135
|
+
--Trigger on rising edge of the clock.
|
136
|
+
if rising_edge(clk) then
|
137
|
+
|
138
|
+
if reset = '1' then
|
139
|
+
element <= (others => (others => '0'));
|
140
|
+
else
|
141
|
+
|
142
|
+
--If the enqueue operation is selected...
|
143
|
+
if enqueue = '1' and enqueue_allowed = '1' then
|
144
|
+
|
145
|
+
--Add the new element in the new free space.
|
146
|
+
element(enqueue_target) <= data_in;
|
147
|
+
|
148
|
+
--If only the write flag is set, increment the element count.
|
149
|
+
if dequeue = '0' then
|
150
|
+
count_reg <= count_reg + 1;
|
151
|
+
end if;
|
152
|
+
|
153
|
+
end if;
|
154
|
+
|
155
|
+
--If the dequeue flag is set (and there are elements to read), remove an element from the queue.
|
156
|
+
if dequeue = '1' and empty_sig = '0' then
|
157
|
+
|
158
|
+
--Shift each element one towards zero.
|
159
|
+
--Note that this isn't "expensive", as it would be in software-
|
160
|
+
--we're simultaneously adjusting the value of each element, in parallel.
|
161
|
+
for i in 0 to element_count - 2 loop
|
162
|
+
element(i) <= element(i + 1);
|
163
|
+
end loop;
|
164
|
+
|
165
|
+
--If only the read flag is set, decrement the count.
|
166
|
+
if enqueue = '0' then
|
167
|
+
count_reg <= count_reg - 1;
|
168
|
+
end if;
|
169
|
+
|
170
|
+
end if;
|
171
|
+
|
172
|
+
end if;
|
173
|
+
end if;
|
174
|
+
end process;
|
175
|
+
|
176
|
+
|
177
|
+
end Behavioral;
|
178
|
+
|