Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Commit f4b063b

Browse files
committed
M2 exported IP added
1 parent 6473a1a commit f4b063b

File tree

490 files changed

+1086884
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

490 files changed

+1086884
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<autopilotfilemapping:AutoPilotFileMapping xmlns:autopilotfilemapping="www.autoesl.com/autopilotfilemapping">
3+
<source>
4+
<originFiles name="core.cpp" path="C:\Users\CS\Desktop\Vivado-Projects\M3\my_ip_hls\core.cpp"/>
5+
<originFiles name="ip2ps_fifo.cpp" path="C:\Users\CS\Desktop\Vivado-Projects\M3\my_ip_hls\ip2ps_fifo.cpp"/>
6+
<originFiles name="my_ip_hls.cpp" path="C:\Users\CS\Desktop\Vivado-Projects\M3\my_ip_hls\my_ip_hls.cpp"/>
7+
<originFiles name="my_ip_hls.hpp" path="C:\Users\CS\Desktop\Vivado-Projects\M3\my_ip_hls\my_ip_hls.hpp"/>
8+
<originFiles name="ps2ip_fifo.cpp" path="C:\Users\CS\Desktop\Vivado-Projects\M3\my_ip_hls\ps2ip_fifo.cpp"/>
9+
<originFiles name="counters_out.cpp" path="C:\Users\CS\Desktop\Vivado-Projects\M3\my_ip_hls\counters_out.cpp"/>
10+
<originFiles name="rules_in.cpp" path="C:\Users\CS\Desktop\Vivado-Projects\M3\my_ip_hls\rules_in.cpp"/>
11+
</source>
12+
<testbench>
13+
<originFiles name="my_ip_hls_tb.cpp" path="C:\Users\CS\Desktop\Vivado-Projects\M3\my_ip_hls\my_ip_hls_tb.cpp"/>
14+
</testbench>
15+
</autopilotfilemapping:AutoPilotFileMapping>

Milestone-2/IP/my_ip_hls/.cproject

Lines changed: 182 additions & 0 deletions
Large diffs are not rendered by default.

Milestone-2/IP/my_ip_hls/.project

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>my_ip_hls</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
10+
<triggers>clean,full,incremental,</triggers>
11+
<arguments>
12+
</arguments>
13+
</buildCommand>
14+
<buildCommand>
15+
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
16+
<triggers>full,incremental,</triggers>
17+
<arguments>
18+
</arguments>
19+
</buildCommand>
20+
</buildSpec>
21+
<natures>
22+
<nature>com.autoesl.autopilot.ui.AutopilotNature</nature>
23+
<nature>org.eclipse.cdt.core.cnature</nature>
24+
<nature>org.eclipse.cdt.core.ccnature</nature>
25+
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
26+
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
27+
</natures>
28+
<linkedResources>
29+
<link>
30+
<name>source</name>
31+
<type>2</type>
32+
<location>C:/Users/CS/Desktop/Vivado-Projects/M3/my_ip_hls/.apc/.src</location>
33+
</link>
34+
<link>
35+
<name>testbench</name>
36+
<type>2</type>
37+
<location>C:/Users/CS/Desktop/Vivado-Projects/M3/my_ip_hls/.apc/.tb</location>
38+
</link>
39+
<link>
40+
<name>solution1/constraints</name>
41+
<type>2</type>
42+
<location>C:/Users/CS/Desktop/Vivado-Projects/M3/my_ip_hls/solution1/.tcls</location>
43+
</link>
44+
<link>
45+
<name>source/core.cpp</name>
46+
<type>1</type>
47+
<location>C:/Users/CS/Desktop/Vivado-Projects/M3/my_ip_hls/core.cpp</location>
48+
</link>
49+
<link>
50+
<name>source/counters_out.cpp</name>
51+
<type>1</type>
52+
<location>C:/Users/CS/Desktop/Vivado-Projects/M3/my_ip_hls/counters_out.cpp</location>
53+
</link>
54+
<link>
55+
<name>source/ip2ps_fifo.cpp</name>
56+
<type>1</type>
57+
<location>C:/Users/CS/Desktop/Vivado-Projects/M3/my_ip_hls/ip2ps_fifo.cpp</location>
58+
</link>
59+
<link>
60+
<name>source/my_ip_hls.cpp</name>
61+
<type>1</type>
62+
<location>C:/Users/CS/Desktop/Vivado-Projects/M3/my_ip_hls/my_ip_hls.cpp</location>
63+
</link>
64+
<link>
65+
<name>source/my_ip_hls.hpp</name>
66+
<type>1</type>
67+
<location>C:/Users/CS/Desktop/Vivado-Projects/M3/my_ip_hls/my_ip_hls.hpp</location>
68+
</link>
69+
<link>
70+
<name>source/ps2ip_fifo.cpp</name>
71+
<type>1</type>
72+
<location>C:/Users/CS/Desktop/Vivado-Projects/M3/my_ip_hls/ps2ip_fifo.cpp</location>
73+
</link>
74+
<link>
75+
<name>source/rules_in.cpp</name>
76+
<type>1</type>
77+
<location>C:/Users/CS/Desktop/Vivado-Projects/M3/my_ip_hls/rules_in.cpp</location>
78+
</link>
79+
<link>
80+
<name>testbench/my_ip_hls_tb.cpp</name>
81+
<type>1</type>
82+
<location>C:/Users/CS/Desktop/Vivado-Projects/M3/my_ip_hls/my_ip_hls_tb.cpp</location>
83+
</link>
84+
<link>
85+
<name>solution1/constraints/.xml.directive</name>
86+
<type>1</type>
87+
<location>C:/Users/CS/Desktop/Vivado-Projects/M3/my_ip_hls/solution1/solution1.directive</location>
88+
</link>
89+
<link>
90+
<name>solution1/constraints/directives.tcl</name>
91+
<type>1</type>
92+
<location>C:/Users/CS/Desktop/Vivado-Projects/M3/my_ip_hls/solution1/directives.tcl</location>
93+
</link>
94+
<link>
95+
<name>solution1/constraints/script.tcl</name>
96+
<type>1</type>
97+
<location>C:/Users/CS/Desktop/Vivado-Projects/M3/my_ip_hls/solution1/script.tcl</location>
98+
</link>
99+
</linkedResources>
100+
</projectDescription>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<project>
3+
<configuration id="cdt.managedbuild.config.gnu.exe.debug.933092615" name="Debug">
4+
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
5+
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
6+
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
7+
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
8+
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="428129666725747829" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
9+
<language-scope id="org.eclipse.cdt.core.gcc"/>
10+
<language-scope id="org.eclipse.cdt.core.g++"/>
11+
</provider>
12+
</extension>
13+
</configuration>
14+
<configuration id="cdt.managedbuild.config.gnu.exe.release.1499905548" name="Release">
15+
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
16+
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
17+
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
18+
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
19+
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="428129666725747829" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
20+
<language-scope id="org.eclipse.cdt.core.gcc"/>
21+
<language-scope id="org.eclipse.cdt.core.g++"/>
22+
</provider>
23+
</extension>
24+
</configuration>
25+
</project>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<launchConfiguration type="org.eclipse.cdt.launch.applicationLaunchType">
3+
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
4+
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="Debug/a.exe"/>
5+
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="my_ip_hls"/>
6+
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
7+
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="cdt.managedbuild.config.gnu.exe.debug.933092615"/>
8+
<stringAttribute key="org.eclipse.cdt.launch.WORKING_DIRECTORY" value="C:\Users\CS\Desktop\Vivado-Projects\M3\my_ip_hls"/>
9+
<booleanAttribute key="org.eclipse.cdt.launch.use_terminal" value="true"/>
10+
<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.cdt.debug.core.sourceLocator"/>
11+
<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;sourceLookupDirector&gt;&#13;&#10;&lt;sourceContainers duplicates=&quot;false&quot;&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;default/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.debug.core.containerType.default&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;directory nest=&amp;quot;true&amp;quot; path=&amp;quot;C:\Xilinx\Vivado\2017.4\win64\tools\systemc&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.debug.core.containerType.directory&quot;/&gt;&#13;&#10;&lt;/sourceContainers&gt;&#13;&#10;&lt;/sourceLookupDirector&gt;&#13;&#10;"/>
12+
</launchConfiguration>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<launchConfiguration type="org.eclipse.cdt.launch.applicationLaunchType">
3+
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
4+
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="Release/a.exe"/>
5+
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="my_ip_hls"/>
6+
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
7+
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="cdt.managedbuild.config.gnu.exe.release.1499905548"/>
8+
<stringAttribute key="org.eclipse.cdt.launch.WORKING_DIRECTORY" value="C:\Users\CS\Desktop\Vivado-Projects\M3\my_ip_hls"/>
9+
<booleanAttribute key="org.eclipse.cdt.launch.use_terminal" value="true"/>
10+
<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.cdt.debug.core.sourceLocator"/>
11+
<stringAttribute key="org.eclipse.debug.core.source_locator_memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;sourceLookupDirector&gt;&#13;&#10;&lt;sourceContainers duplicates=&quot;false&quot;&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;default/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.debug.core.containerType.default&quot;/&gt;&#13;&#10;&lt;container memento=&quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;no&amp;quot;?&amp;gt;&amp;#13;&amp;#10;&amp;lt;directory nest=&amp;quot;true&amp;quot; path=&amp;quot;C:\Xilinx\Vivado\2017.4\win64\tools\systemc&amp;quot;/&amp;gt;&amp;#13;&amp;#10;&quot; typeId=&quot;org.eclipse.debug.core.containerType.directory&quot;/&gt;&#13;&#10;&lt;/sourceContainers&gt;&#13;&#10;&lt;/sourceLookupDirector&gt;&#13;&#10;"/>
12+
</launchConfiguration>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<vivadoHLSLog:LogRoot xmlns:vivadoHLSLog="www.xilinx.com/vivadoHLSLog">
3+
<errorLogs>
4+
<logs>
5+
<synLog/>
6+
<simLog/>
7+
<mgLog/>
8+
<packageLog/>
9+
<csimLog/>
10+
</logs>
11+
</errorLogs>
12+
<warningLogs>
13+
<logs>
14+
<synLog>
15+
<logs message="WARNING: [RTGEN 206-101] Register 'cnt2Reg_core_V' is power-on initialization." projectName="my_ip_hls" solutionName="solution1" date="2019-05-29T09:54:40.551+0200" type="Warning"/>
16+
<logs message="WARNING: [RTGEN 206-101] Register 'cnt1Reg_core_V' is power-on initialization." projectName="my_ip_hls" solutionName="solution1" date="2019-05-29T09:54:40.535+0200" type="Warning"/>
17+
<logs message="WARNING: [RTGEN 206-101] Register 'cnt0Reg_core_V' is power-on initialization." projectName="my_ip_hls" solutionName="solution1" date="2019-05-29T09:54:40.520+0200" type="Warning"/>
18+
<logs message="WARNING: [SYN 201-103] Legalizing function name 'my_ip_hls.entry83' to 'my_ip_hls_entry83'." projectName="my_ip_hls" solutionName="solution1" date="2019-05-29T09:54:37.907+0200" type="Warning"/>
19+
<logs message="WARNING: [SYN 201-103] Legalizing function name 'my_ip_hls.entry3' to 'my_ip_hls_entry3'." projectName="my_ip_hls" solutionName="solution1" date="2019-05-29T09:54:37.892+0200" type="Warning"/>
20+
</synLog>
21+
<simLog/>
22+
<mgLog/>
23+
<packageLog/>
24+
<csimLog/>
25+
</logs>
26+
</warningLogs>
27+
</vivadoHLSLog:LogRoot>

Milestone-2/IP/my_ip_hls/core.cpp

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#include "my_ip_hls.hpp"
2+
3+
void core( stream<axiWord> &ps2ipIntFifo,stream<axiWord> &ip2psIntFifo,
4+
uint32 rule0Reg, uint32 rule1Reg, uint32 rule2Reg,
5+
uint32 &cnt0Reg, uint32 &cnt1Reg, uint32 &cnt2Reg) {
6+
7+
#pragma HLS PIPELINE II=1 enable_flush
8+
#pragma HLS INTERFACE ap_ctrl_none port=return
9+
10+
static enum inStates {
11+
IN_STATE_IDLE = 0
12+
} curState;
13+
14+
static axiWord newInWord = {0,0,0};
15+
16+
// Counters actual registers
17+
static uint32 cnt0Reg_core=0;
18+
static uint32 cnt1Reg_core=0;
19+
static uint32 cnt2Reg_core=0;
20+
21+
switch(curState) {
22+
23+
case (IN_STATE_IDLE): {
24+
if (!ps2ipIntFifo.empty()) {
25+
ps2ipIntFifo.read(newInWord);
26+
27+
// Check if this packet triggers one of the rules
28+
if (rule0Reg == newInWord.data){
29+
cnt0Reg_core++;
30+
}
31+
else if(rule1Reg == newInWord.data){
32+
cnt1Reg_core++;
33+
}
34+
else if (rule2Reg == newInWord.data){
35+
cnt2Reg_core++;
36+
}
37+
// Write back packet only in case none
38+
// of the rules has been triggered
39+
else{
40+
ip2psIntFifo.write(newInWord);
41+
}
42+
43+
// Give back counters values
44+
cnt0Reg=cnt0Reg_core;
45+
cnt1Reg=cnt1Reg_core;
46+
cnt2Reg=cnt2Reg_core;
47+
}
48+
49+
curState = IN_STATE_IDLE;
50+
51+
break;
52+
}
53+
};
54+
55+
return;
56+
57+
}
58+
59+
60+
61+
62+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include "my_ip_hls.hpp"
2+
3+
void counters_out( uint32 cnt0Reg, uint32 cnt1Reg, uint32 cnt2Reg,
4+
uint32 &rule0cnt, uint32 &rule1cnt, uint32 &rule2cnt){
5+
6+
// PS Reads rules' Counters
7+
rule0cnt = cnt0Reg;
8+
rule1cnt = cnt1Reg;
9+
rule2cnt = cnt2Reg;
10+
11+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#include "my_ip_hls.hpp"
2+
3+
4+
void ip2ps_fifo(stream<axiWord> &ip2psIntFifo,stream<axiWord> &ip2ps) {
5+
#pragma HLS PIPELINE II=1 enable_flush
6+
7+
static enum inStates { IN_STATE_IDLE = 0
8+
} curState;
9+
10+
11+
switch(curState) {
12+
13+
case (IN_STATE_IDLE): {
14+
if (!ip2psIntFifo.empty()) {
15+
axiWord newInWord = {0,0,0};
16+
ip2psIntFifo.read(newInWord);
17+
ip2ps.write(newInWord);
18+
}
19+
20+
curState = IN_STATE_IDLE;
21+
break;
22+
}
23+
};
24+
25+
return;
26+
27+
}
28+
29+
30+
31+
32+

0 commit comments

Comments
 (0)